<?php 
/* SVN FILE: $Id$ */
/* Transaction Test cases generated on: 2009-09-10 10:36:18 : 1252578978*/
App::import('Model', 'Transaction');

class TransactionTestCase extends CakeTestCase {
	var $Transaction = null;
	var $fixtures = array('app.transaction', 'app.order', 'app.customer', 'app.product');

	function startTest() {
		$this->Transaction =& ClassRegistry::init('Transaction');
	}

	function testTransactionInstance() {
		$this->assertTrue(is_a($this->Transaction, 'Transaction'));
	}

	function testTransactionFind() {
		$this->Transaction->recursive = -1;
		$results = $this->Transaction->find('first');
		$this->assertTrue(!empty($results));

		$expected = array('Transaction' => array(
			'id'  => 1,
			'price'  => 1,
			'count'  => 1,
			'order_id'  => 1,
			'customer_id'  => 1,
			'product_id'  => 1
		));
		$this->assertEqual($results, $expected);
	}
}
?>